package EX2;

import java.io.*;

public class copy_2 {
    public static void main(String[] args) throws IOException {
        File f=new File("C:/filea/a.txt");
        InputStream is=new FileInputStream(f);
        OutputStream os=new FileOutputStream("C:/filea/a2.txt");

        byte[] buf=new byte[is.available()];
        int n;
        is.read(buf);
        os.write(buf);
        os.flush();
        is.close();
        os.close();
    }
}
